package cc.openkit.admin.controller.api;

import cc.openkit.admin.model.XhCategory;
import cc.openkit.admin.service.xh.*;
import org.apache.log4j.Logger;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * app 开发学习接口
 *
 * @author bigben
 * @date 2018.2.5
 */
@Controller
@Scope("prototype")
@RequestMapping("/apiXh")
public class ApiXhController {

    private Logger log = Logger.getLogger(ApiXhController.class);

    @Resource
    private XhUserService xhUserService;
    @Resource
    private XhTokensService xhTokensService;
    @Resource
    private XhSliderService xhSliderService;
    @Resource
    private XhCategoryService xhCategoryService;
    @Resource
    private XhArticleService xhArticleService;

    @RequestMapping(value = "/getCategory", method = RequestMethod.POST)
    @ResponseBody
    public Object register(HttpServletRequest request){

        log.info("获取所有分类");
        List<XhCategory> xhCategories = xhCategoryService.queryAll();

        return null;
    }
}
